package com.qf.service.impl;

import com.qf.dao.OrderDao;
import com.qf.pojo.Order;
import com.qf.pojo.Order_info;
import com.qf.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class OrderServiceImpl implements OrderService {
    @Autowired(required = false)
    private OrderDao orderDao;
    @Override
    public int add(Order order) {
        return orderDao.add(order);
    }

    @Override
    public Order selectOne(int oid) {
        return orderDao.selectOne(oid);
    }

    @Override
    public List<Order> selectAll() {
        return orderDao.selectAll();
    }

    @Override
    public int delete(int oid) {
        return orderDao.delete(oid);
    }

    @Override
    public int update(Order order) {
        return orderDao.update(order);
    }

    @Override
    public List<Order_info> allOrder(int uid,int page) {
        return orderDao.allOrder(uid,page);
    }

    @Override
    public int getRows(int uid) {
        return orderDao.getRows(uid);
    }
}
